/**
 * 搜索相关模块
 */
 import request from '@/utils/request'


//整合检索
 export function Integration(data){
  return request({
    url: '/Index/Integration',
    method: 'post',
    data,
  })
}

export function GetPicture(params){
  return request({
    url: '/Index/GetPicture',
    method: 'get',
    params,
  })
 
}
export function GetVideo(data){

  return request({
    url: '/Index/GetVideo',
    method: 'post',
    data,
  })

}

export function GetIndexData(params){

  return request({
    url: '/Index/GetIndexData',
    method: 'get',
    params,
  })
 data
}

//详情
export function getDocumentDetail(data){
  return request({
    url: '/earthquakeRelief/getDocumentDetail',
    method: 'post',
    data,
  })
}


/**
 * 获取搜索结果
 */
 export function getSearch(params) {
    return request({
      method: "GET",
      url: "/v1_0/search",
      params
    })
  }

  /**s
 * 获取联想建议（自动补全）
 */
 export const getSearchSuggestions=q=> {
  return request({
    method: "GET",
    url: "/v1_0/suggestion",
    params:{
         q // 联想建议关键词
    }
  })
}

  /**s
 * 获取联想建议（自动补全）
 */
   export const getUserSearcHistories=()=> {
    return request({
      method: "GET",
      url: "/v1_0/search/histories",
      
    })
  }

  //下载
export function commonFileInterface(data) {
  return request({
    url: '/innovate/commonFileInterface',
    method: 'post',
    data,
    responseType: 'blob',
  })
}